#!/bin/sh

if [ $IS_DOCKER ];then
  exit 0
fi

YHB_TIME="$(date +%s000)"
GIT_VERSION="$(git rev-parse --short HEAD)"
GIT_USER_NAME="$(git config user.name)"
docker build . -t registry.cn-shenzhen.aliyuncs.com/yhb_server/api:"$YHB_TIME-$GIT_VERSION-$GIT_USER_NAME"
docker push registry.cn-shenzhen.aliyuncs.com/yhb_server/api:"$YHB_TIME-$GIT_VERSION-$GIT_USER_NAME"
echo "$YHB_TIME-$GIT_VERSION-$GIT_USER_NAME"